/*
 * @Author: MiNine
 * @Date: 2020-09-18 17:28:29
 * @LastEditors: MiNine
 * @LastEditTime: 2020-09-18 17:36:57
 * @Description: 保险产品
 */

const {
  Schema,
  model
} = require('mongoose');

const insureProductSchema = new Schema({
  //名称
  productName: String,
  //价格
  productPrice: String,
  //赔付金额
  compensation: String,
  //上线时间
  uptime: String,
  //所属保险分类id
  belongInsureSortId: {
    type: Schema.Types.ObjectId,
    ref: 'InsureSort'
  },
  //有效期
  indate: Number,
  //保险图片
  imgSrc: String,
  //产品介绍
  productIntroduce: String,
}, {
  versionKey: false
})

const InsureProduct = model('InsureProduct', insureProductSchema);

module.exports.InsureProduct = InsureProduct;